package com.alex.demo.springtest.service;


import com.alex.demo.springtest.bean.BigCar;
import org.springframework.stereotype.Service;

@Service("testService01")
public class TestService01 {
    public BigCar addTest(String test) throws Exception{
        BigCar bigCar = new BigCar();
        System.out.println("请先输入测试字符");
        if(!test.equals("test01")){
            throw new Exception("输入字符不符合");
        }
        bigCar.setTest(test);
        return bigCar;
    }
}
